package com.central.gateway.error;

import lombok.Data;

/**
 * 业务异常类
 * @author zouzhihui
 */
@Data
public class BusinessException extends RuntimeException {

    private String code;
    private String errorMessage;

    public BusinessException(String code, String errorMessage) {
        this.code = code;
        this.errorMessage = errorMessage;
    }

    @Override
    public String toString() {
        return "BusinessException{" +
                "code='" + code + '\'' +
                ", errorMessage='" + errorMessage + '\'' +
                '}';
    }
}
